//
//  CameraManagerDelegate.h
//  YPC-IsBang
//
//  Created by dsw on 2019/8/22.
//  Copyright © 2019 i4season. All rights reserved.
//

#import <Foundation/Foundation.h>

@class CMResolution;
/// IFSCameraManager 类的代理方法
@protocol CameraDelegate <NSObject>

@optional

/// 设备状态回调
/// @param status status description
/// @param param 附带信息
- (void)deviceConnectWithStatus:(CMConnectStatus)status param:(NSDictionary *)param;

/// 上线设备更新回调
- (void)deviceUpdata;

/// 收到帧数据回调
/// @param image image description
- (void)receiveData:(NSData *)data image:(UIImage *)image;
- (void)receiveOriginImage:(UIImage *)originImage processedImage:(UIImage *)processedImage;

/// 收到音频数据
/// @param data 数据
- (void)receiveAudioData:(NSData *)data index:(NSUInteger)index;

/// 陀螺仪数据
/// @param gyroRadian 弧度
//- (void)receiveGyroRadian:(float)gyroRadian;

/// 6轴陀螺仪数据
- (void)receiveGyro6AxisData:(NSData *)gyroRadian;

/// 距离传感数据
/// @param distance 距离 0-100
- (void)receiveDistance:(float)distance;

/// 电量信息
/// @param battery 电量
/// @param chargingStatus 是否充电
- (void)receiveBattery:(int)battery chargingStatus:(BOOL)chargingStatus __attribute__((deprecated("Use - receiveBattery:chargingStatus:powerOff:")));;
/// 电量信息
/// @param battery 电量
/// @param chargingStatus 是否充电
/// @param powerOff 将关机
- (void)receiveBattery:(int)battery chargingStatus:(BOOL)chargingStatus powerOff:(BOOL)powerOff;

/// 马达状态
/// @param motor 马达状态
- (void)receiveMotorChanged:(BOOL)motor;

/// 马达值
/// @param motorValue 马达值变化
- (void)receiveMotorValueChanged:(int)motorValue;

/// 黑头仪模式变化
/// @param mode 模式变化 当前模式  0：正常模式（护理模式）1：厂测模式 2：黑头查看模式 3:蓝光杀菌
- (void)receiveCameraModeChanged:(CameraMode)mode;

/// 收到移动提醒通知
- (void)receiveShowLongAbsorb DEPRECATED_MSG_ATTRIBUTE("use -receiveNeedMove:");;
- (void)receiveNeedMove:(BOOL)needMove;

/// 图片亮度变化
- (void)receiveImageLightChanged:(NSInteger)imageLight;

/// 收到摄像头状态变化
- (void)receiveCameraStateChanged:(CameraState)state;

/// 收到摄像头是否插入变化
- (void)receiveCameraSensorChanged:(BOOL)sensor;

/// 摄像头镜头变化(分辨率变化)
- (void)receiveCameraResolutionChanged:(CMResolution *)resolution;

/// 使用时间太长提醒 5min
- (void)receiveUseTimeTooLongNotice;

/// 收到切换手机前置摄像头指令
- (void)receiveCommandChangeFrontCamera;

/// 收到按键指令-拍照
- (void)receiveCommandTakePhoto;

/// 收到按键指令-录制
- (void)receiveCommandStartRecord;

/// 收到按键指令-停止录制 / 在进入后台或掉线情况下,也会调用.
- (void)receiveCommandStopRecord;

/// 收到切换摄像头/分辨率
- (void)receiveCommandChangeCamera;

/// 按键缩放
- (void)receiveCommandZoom:(BOOL)zoomUP;

/// 暂停画面
- (void)receiveCommandPauseImageChanged:(BOOL)pause;

/// 镜像画面
- (void)receiveCommandMirrorImage;


/// 获取到设备信息
/// @param properties 属性集合
- (void)receiveDeviceProperties:(CameraPropertiesCache *)properties;


///漏烧结果
- (void)receiveBrunLicenseResult:(BOOL)result;

/// 收到文件推送通知 ⚠️只能有一个示例实现此方法
- (void)receiveRemoteFilesPushNotificationWithFile:(NSString *)file completion:(void(^)(BOOL receive))completion;

/// 收到文件推送通知  进度回调
- (void)receiveRemoteFilesPushNotificationWithProgress:(NSInteger)progress finish:(BOOL)finish error:(BOOL)error;

/// 灯光值变化
- (void)receiveLightChanged:(NSInteger)light;

/// 多手机连接占用冲突, YES 代表设备被占用, 当前APP不能正常出图
- (void)receiveDeviceConflicted:(BOOL)conflicted;

/// sd卡变化
- (void)receiveSDCardChanged:(BOOL)hasCard;

/// 收到设备缩放的值, 并非缩放命令, 用于界面显示当前缩放比例, 实际画面缩放已由设备处理
- (void)receiveZoomValue:(NSInteger)value;

/// 收到按键指令, 显示滤镜调节弹窗
- (void)receiveCommandFilterViewDisplay:(BOOL)display;

/// 收到按键指令, 显示设备文件
- (void)receiveCommandDeviceFilesDisplay:(BOOL)display;

/// 收到扩展数据
- (void)receiveExtData:(NSDictionary *)extData;

#pragma mark - MFI
- (void)receiveMFIAccessoryDidConnect:(BOOL)connect protocol:(NSString *)protocol;

@end
